/*
 * Workflow.java
 *
 * Created on Jun 4, 2007, 9:56:44 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.infomancers.workflow;

import com.infomancers.collections.CollectionsAlgorithms;
import com.infomancers.collections.Predicate;
import com.infomancers.collections.iterators.CanonicalIterator;
import com.infomancers.collections.iterators.CanonicalIterator.Canonise;
import com.infomancers.collections.iterators.RecursiveIterator;
import com.infomancers.collections.iterators.RecursiveIterator.Recurse;
import java.util.Collection;
import java.util.Iterator;

/**
 *
 * @author aviadbd
 */
public final class Workflow {
    private Place output;
    private Place input;
    private FlowManager flowManager;
    private Collection<Place> places;
    
    public FlowManager getFlowManager() {
        return flowManager;
    }
    
    public void setFlowManager(FlowManager flowManager) {
        this.flowManager = flowManager;
    }
    
    public Place findPlace(Predicate<Place> predicate) {
        return CollectionsAlgorithms.findItem(predicate, getPlaces());
    }
    
    public Collection<Place> getPlaces() {
        return places;
    }
    
    public void setPlaces(Collection<Place> places) {
        this.places = places;
    }
    
    public void setInput(Place input) {
        this.input = input;
    }
    
    public void setOutput(Place output) {
        this.output = output;
    }
    
    public Place getOutput() {
        return output;
    }
    
    public Place getInput() {
        return input;
    }
}
